import request from '@/api/utils/request';

// 班级集体考核列表 分页查询
export const getClassExamineCategory = data =>
  request({
    method: 'post',
    url: '/schExamine/getClassExamineCategory',
    data
  });

// 班级集体考核列表 综合查询
export const getComplexExamineCategory = data =>
  request({
    method: 'post',
    url: '/schExamine/getComplexExamineCategory',
    data
  });
// 班级集体房间的扣分详情
export const getExamineRoomDetails = data =>
  request({
    method: 'post',
    url: '/schExamine/getExamineRoomDetails',
    data
  });
// 班级集体-综合查询-查看-顶部的扣分详情
export const getComplexExamineDetails = data =>
  request({
    method: 'post',
    url: '/schExamine/getComplexExamineDetails',
    data
  });

// 班级集体-综合查询-查看-每天的扣分详情
export const getComplexExamineDayDetails = data =>
  request({
    method: 'post',
    url: '/schExamine/getComplexExamineDayDetails',
    data
  });

/**
 * 导出班级集体的综合查询
 *  @param {
 *        ids: [1,2,1] //班级id数组
 *        examineStartTime : "2022-03-06",//检查时间开始
 *        examineStopTime  : "2022-03-06"//检查时间结束
 * }
 */
export const exportCollectiveExamine = data =>
  request({
    method: 'post',
    url: '/schExamine/exportCollectiveExamine',
    data,
    responseType: 'blob'
  });

/**
 * 导出班级集体-综合查询排名(正序和倒叙)的信息
 *  @param {
 *        gradeId: 年级id,
 *        classId: 班级id,
 *        scoreRankAsc : true为正序，false为倒序
 *        examineStartTime : "2022-03-06",//检查时间开始
 *        examineStopTime  : "2022-03-06"//检查时间结束
 * }
 */
export const exportCollectiveRanking = data =>
  request({
    method: 'post',
    url: '/schExamine/exportCollectiveRanking',
    data,
    responseType: 'blob'
  });

/**
 * 导出班级集体列表-分类查询
 *  @param {
 *        ids: [1,2,1] //班级id数组
 *        examineStartTime : "2022-03-06",//检查时间开始
 *        examineStopTime  : "2022-03-06"//检查时间结束
 * }
 */
export const exportItemExamine = data =>
  request({
    method: 'post',
    url: '/schExamine/exportItemExamine',
    data,
    responseType: 'blob'
  });
